#include <iostream>
#include <vector>

using namespace std;

template<class T>
class Sqlist
{
public:
    vector<T> data;
    int length;
};

template<class T>
void Insert(Sqlist<T> &L, T x)
{
    int i = 0;
    L.data.push_back(0);
    while(i < L.length && L.data[i] < x)
    {
        i++;
    }
    for (int j = L.length - 1; j > i; j--)
    {
        L.data[j + 1] = L.data[j];
    }
    L.data[i] = x;
    L.length++;
}